package org.fone.utils.task.data;

public enum TableFieldType {
//    number,date,str
    NUMBER("number","number"),
    DATE("date","date"),
    STR("str","str");

    public final String TYPE;
    public final String VALUE;

    public String getTYPE() {
        return TYPE;
    }

    public String getVALUE() {
        return VALUE;
    }
    TableFieldType (String TYPE, String VALUE){
        this.TYPE = TYPE;
        this.VALUE = VALUE;
    }

    public static TableFieldType getTypeByValue(String value){
        if (null == value){
            return null;
        }
        for (TableFieldType enums : TableFieldType.values()) {
            if (enums.getVALUE().equals(value)) {
                return enums;
            }
        }
        return null;
    }
}
